package rrrmai.viewmodel;

import android.arch.lifecycle.ViewModelProvider;
import android.support.annotation.NonNull;

import javax.inject.Inject;

import rrrmai.repository.ContactRepository;
import rrrmai.repository.PostRepository;

/**
 * Created by az on 2018/3/23.
 */

public class ContactModelFactory implements ViewModelProvider.Factory {

    private final ContactRepository postRepository;

    @Inject
    public ContactModelFactory(ContactRepository postRepository) {
        this.postRepository = postRepository;
    }

    @NonNull
    @Override
    public  ContactViewModel create(@NonNull Class modelClass) {
        return new ContactViewModel(postRepository);
    }
}
